package com.parkreport.report.action;

import java.io.IOException;
import java.io.OutputStream;

import javax.xml.rpc.ServiceException;

import org.jfree.data.time.Year;

import com.common.base.BaseAction;
import com.common.doc.xsl.POIFManager;
import com.common.report.vo.ReportTableViewVO;
import com.common.util.StringUtil;
import com.parkreport.report.service.TicketMarketReportService;

public class TicketMarketAction extends BaseAction {
	TicketMarketReportService service = new TicketMarketReportService();
	
	private ReportTableViewVO tableVO = new ReportTableViewVO();
	private String year;
	private String parkName;
	private String parkId;
	

	public String ticketCount(){
		try {
			if(StringUtil.isBlank(year)){
				year = new Year().toString();
			}
			service.setYear(year);
			service.setParkId(parkId);
			tableVO = service.getTableViewVO(this.getRequest());
			tableVO.setReportName(year+"年1月至12月"+StringUtil.nullToStr(parkName)+"景区游客结构分析统计表");
			tableVO.setMentName("日期");
		
			this.getSession().setAttribute("tableVO", tableVO);
		} catch (ServiceException e) {
			log.error(e.getMessage(),e);
		}
		
		return topager("/pages/report/ticketmarket/list.jsp");
	}
	

	public String getParkId() {
		return parkId;
	}

	public void setParkId(String parkId) {
		this.parkId = parkId;
	}
	public String getYear() {
		return year;
	}

	public String getParkName() {
		return parkName;
	}

	public void setParkName(String parkName) {
		this.parkName = parkName;
	}

	public ReportTableViewVO getTableVO() {
		return tableVO;
	}

	public void setTableVO(ReportTableViewVO tableVO) {
		this.tableVO = tableVO;
	}

	public void setYear(String year) {
		this.year = year;
	}
}

